<html><head><title>Importing and Exporting Text Files</title><meta name="filename" content="text/scalc/guide/csv_formula"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
p.P1{
}
p.P2{
}
p.P3{
}
span.T1{
font-weight:bold;}
</style></head><body>
<p class="P1"/>
<p class="Head1"><help:paragraphinfo state="U" number="1" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="csv files; spreadsheet" tag="kw68161_1" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="formulas; saving as csv files" tag="kw68161_7" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="exporting; tables as text" tag="kw68161_6" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="importing; tables as text" tag="kw68161_5" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="tables; exporting as text" tag="kw68161_4" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="tables; importing as text" tag="kw68161_3" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="text; importing to spreadsheet" tag="kw68161_2" xmlns:help="http://openoffice.org/2000/help"/><help:to-be-embedded Eid="csv_formula" xmlns:help="http://openoffice.org/2000/help"><help:link Id="68161">Importing and Exporting Text Files</help:link></help:to-be-embedded></p>
<p class="Paragraph"><help:paragraphinfo state="U" number="2" xmlns:help="http://openoffice.org/2000/help"/>Comma separated values (CSV) files are text files that contain the cell contents of a single sheet. Commas, semicolons, or other characters can be used as the field delimiters between the cells. Text strings are put in quotation marks, numbers are written without quotation marks.</p>
<p class="Head2"><help:paragraphinfo state="U" number="15" xmlns:help="http://openoffice.org/2000/help"/>Importing a CSV File</p>
<p class="P2"><help:paragraphinfo state="U" number="17" xmlns:help="http://openoffice.org/2000/help"/>In the <span class="T1">Save as type</span> field, select the format "Text CSV". Select the file and click <span class="T1">Open</span>. When a file has the .csv extension, the file type is automatically recognized.</p>
</li>
<li class="">
<p class="P2"><help:paragraphinfo state="U" number="18" xmlns:help="http://openoffice.org/2000/help"/>You will see the <span class="T1">Import text files</span> dialog. Click OK.</p>
</li>
<li class="">
<p class="P2"><help:paragraphinfo state="U" number="19" xmlns:help="http://openoffice.org/2000/help"/>If the csv file contains formulas as formulas, clear the <span class="T1">Formulas</span> check box in <span class="T1">Tools - Options - Spreadsheet - View</span>, so that you see the calculated results in the table.</p>
</li>
</ol>
<p class="Head2"><help:paragraphinfo state="U" number="3" xmlns:help="http://openoffice.org/2000/help"/>Exporting Formulas and Values as CSV Files</p>
<ol class="L2">
<li class="">
<p class="P3"><help:paragraphinfo state="U" number="4" xmlns:help="http://openoffice.org/2000/help"/>Click the sheet to be written as a csv file.</p>
</li>
<li class="">
<p class="P3"><help:paragraphinfo state="U" number="5" xmlns:help="http://openoffice.org/2000/help"/>If you want to export the formulas as formulas, for example, in the form =SUM(A1:B5), proceed as follows:</p>
<p class="P3"><help:paragraphinfo state="U" number="7" xmlns:help="http://openoffice.org/2000/help"/>Under <span class="T1">Display</span>, mark the <span class="T1">Formulas</span> check box. Click OK.</p>
<p class="P3"><help:paragraphinfo state="U" number="8" xmlns:help="http://openoffice.org/2000/help"/>If you want to export the calculation results instead of the formulas, do not mark <span class="T1">Formulas</span>.</p>
</li>
<li class="">
<p class="P3"><help:paragraphinfo state="U" number="9" xmlns:help="http://openoffice.org/2000/help"/>Choose <span class="T1">File - Save as</span>. You will see the <span class="T1">Save as</span> dialog.</p>
</li>
<li class="">
<p class="P3"><help:paragraphinfo state="U" number="10" xmlns:help="http://openoffice.org/2000/help"/>In the<span class="T1"> File type</span> field select the format "Text CSV".</p>
</li>
<li class="">
<p class="P3"><help:paragraphinfo state="U" number="13" xmlns:help="http://openoffice.org/2000/help"/>Enter a name and click <span class="T1">Save</span>.</p>
</li>
<li class="">
<p class="P3"><help:paragraphinfo state="U" number="23" xmlns:help="http://openoffice.org/2000/help"/>From the <span class="T1">Export of text files</span> dialog that appears, select the character set and the field and text delimiters for the data to be exported, and confirm with OK.</p>
<p class="P3"><help:paragraphinfo state="U" number="12" xmlns:help="http://openoffice.org/2000/help"/>Caution: If the numbers use commas as decimal separators or thousands separators, do not select the comma as the field delimiter. If the text contains double quotation marks, you must select the single quotation mark as separator.</p>
</li>
<li class="">
<p class="P3"><help:paragraphinfo state="U" number="14" xmlns:help="http://openoffice.org/2000/help"/>If necessary, after you have saved, clear the <span class="T1">Formulas</span> check box to see the calculated results in the table again.</p>